package com.mew.chess.core.game.shbz.game.message;

import com.mew.common.util.PbWriteUtils;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LockResponseMessage extends ZebraBaseMessage<LockResponseMessage> {

    private int seatNo;
    private int fishId; //鱼ID
    private int lock; //子弹ID；

    @Override
    public void write(ByteBuf b) {

        PbWriteUtils.attr2byte(this,b);
    }

    @Override
    public LockResponseMessage read(ByteBuf b) {
        LockResponseMessage message = new LockResponseMessage();
        message.seatNo = readInt(b);
        message.fishId = readInt(b);
        message.lock = readInt(b);
        return message;
    }

}
